<?php
class Bbling_Model_Resource_List extends Evebit_Model_Mysql_Abstract {
    protected function _construct() {
		$this->_init ( 'list' );
	}
	
    public function getId($option){
    	if (!isset($option['user_id']) || !isset($option['business_id'])){
    		return null;
    	}
		$db = $this->getReadConnection ();
		$select = $db->select ()->from ( $this->getMainTable () )->where ( "user_id =?", $option['user_id'] );
		$select->where("business_id =?", $option['business_id']);
		$result = $db->fetchRow ( $select );
		return $result?$result['id']:null;
	}
}